package com.avril.service;

import java.util.Vector;

import com.avril.db.OrderDao;
import com.avril.entity.Order;
import com.avril.entity.OrderDetail;

public class OrderService {

	OrderDao orderDao;

	public Vector<Order> findAllOrders(String condition, String inOrOut) {
		orderDao = new OrderDao();
		return orderDao.getAllOutOrders(condition, inOrOut);
	}

	public Order findOrderByProperty(String key, String value) {
		return null;
	}

	public Order findOrderByDetail(OrderDetail detail) {
		return null;
	}

	public boolean addOrder(Order order) {
		orderDao = new OrderDao();
		return orderDao.addOrder(order);
	}

	public void updateOrder(Order order) {

	}

	public boolean cancelOrder(Order order) {
		orderDao = new OrderDao();
		return orderDao.cancelOrder(order);
	}

	public int getAllOrderCountByType(String string) {
		// TODO Auto-generated method stub
		return 0;
	}

}
